<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //直接调用式
        // arr = [ 50,100,200,50,100,2500,250,250]
//    let set = Array.from( new Set(arr))
//         console.log(set);
    //构造函数式
        function setCom (arr){
          let newArr = new Set(arr),
           setArr = Array.from(newArr);

        return setArr
        }
        let arr = [250,250,250,160,15,25,25,46,6];
        console.log(setCom(arr));
         num = Array.form(new Set([15,15,25,25,16,16,18,19]));
         
        console.log(num);

    </script>
    
</body>
</html>